/**
* Create: Monday 2023-01-23-11.11.08 GMT+7
* Title : D. Game With Array
* Author:
*****/
#include <bits/stdc++.h>
using namespace std;
#ifndef MY_TEMPLATE
template <typename T> ostream& operator << (ostream& os, const stack <T> &stack_) {os << "["; int n = (int) stack_.size(); vector <T> archive (n); stack <T> stackCopy_ (stack_); for (int i=0; i<n; ++i) {archive[stackCopy_.size()-1]=stackCopy_.top(); stackCopy_.pop();} if (!archive.empty()) {for (auto it=archive.begin(); it!=archive.end()-1; ++it) {os <<*it <<", ";} os <<archive.back();} os <<" "; return os;}
template <typename T> ostream& operator << (ostream& os, const queue <T> &queue_) {os << "->["; int n = (int) queue_.size(); vector <T> archive (n); queue <T> queueCopy_ (queue_); for (int i=0; i<n; ++i) {archive[queueCopy_.size()-1]=queueCopy_ .front(); queueCopy_.pop();} if (!archive.empty()) {for (auto it=archive.begin(); it!=archive.end()-1; ++it) {os <<*it <<", ";} os <<archive.back();} os <<" "; return os;}
template <typename T> ostream& operator << (ostream& os, const priority_queue <T,vector<T>,greater<T>>&Queue_) {os << "["; int n = (int) Queue_.size(); vector <T> archive (n); priority_queue<T,vector<T>,greater<T>> QueueCopy_ (Queue_); for (int i=0; i<n; ++i) {archive[QueueCopy_.size()-1]=QueueCopy_.top(); QueueCopy_.pop();} if (!archive.empty()) {for (auto it=archive.begin(); it!=archive.end()-1; ++it) {os <<*it <<", ";} os <<archive.back();} os <<" "; return os;}
template <typename T> ostream& operator << (ostream& os, const priority_queue <T> &Queue_) {os << "["; int n = (int) Queue_.size(); vector <T> archive (n); priority_queue<T> QueueCopy_ (Queue_); for (int i=0; i<n; ++i) {archive[QueueCopy_.size()-1]=QueueCopy_.top(); QueueCopy_.pop();} if (!archive.empty()) {for (auto it=archive.begin(); it!=archive.end()-1; ++it) {os <<*it <<", ";} os <<archive.back();} os <<" "; return os;}
template <typename T> ostream& operator << (ostream& os, const vector <T> &vector_) {os << "["; if (!vector_ .empty()) {for (auto it = vector_ .begin(), i=0; i< (int) vector_ .size()-1; ++i, ++it) {os <<*it <<", ";} os << * (vector_ .rbegin());} os << "]"; return os;}
template <typename T> ostream& operator << (ostream& os, const deque <T> &deque_) {os << "["; if (!deque_ .empty()) {for (auto it = deque_ .begin(), i=0; i< (int) deque_ .size()-1; ++i, ++it) {os <<*it <<", ";} os << * (deque_ .rbegin());} os << "]"; return os;}
template <typename T> ostream& operator << (ostream& os, const set <T> &set_) {os << "["; if (!set_ .empty()) {for (auto it = set_ .begin(), i=0; i< (int) set_ .size()-1; ++i, ++it) {os <<*it <<", ";} os << * (set_ .rbegin());} os << "]"; return os;}
template <typename T> ostream& operator << (ostream& os, const multiset <T> &multiSet_) {os << "["; if (!multiSet_.empty()) {for (auto it = multiSet_.begin(), i=0; i< (int) multiSet_ .size()-1; ++i, ++it) {os <<*it <<", ";} os << * (multiSet_ .rbegin());} os << "]"; return os;}
template <typename T, typename _> ostream& operator << (ostream& os, const map <T, _> &map_) {os << "["; if (!map_ .empty()) {for (auto it = map_ .begin(), i=0; i< (int) map_ .size()-1; ++i, ++it) {os <<*it <<", ";} os << * (map_ .rbegin());} os << "]"; return os;}
template <typename T, typename _> ostream& operator << (ostream& os, const multimap <T, _> &multiMap_) {os << "["; if (!multiMap_.empty()) {for (auto it = multiMap_.begin(), i=0; i< (int) multiMap_ .size()-1; ++i, ++it) {os <<*it <<", ";} os << * (multiMap_ .rbegin());} os << "]"; return os;}
template <typename T, typename _> ostream& operator << (ostream& os, const pair <T, _> &pair_) {os << "{"; {os <<pair_.first; os <<":"; os <<pair_.second;} os << "}"; return os;}
template <typename T> void quick_debug (ostream& os, const char *name, const T &value) {os <<"[DEBUG]" << name <<" = " <<value <<endl;};
template <typename T, typename... Args> void quick_debug (ostream& os, const char *name, const T &value, Args&&... args) {os <<"[DEBUG]"; while (*name != ',') {os << *name++;} os << " = " << value << endl; quick_debug (os, name + 1, args...);};
#define hien(...) quick_debug(cerr, " " #__VA_ARGS__, __VA_ARGS__)
#define endl '\n'
#endif
int main() {
ios_base::sync_with_stdio (0); cin.tie (0);
#define trying_to_make_a_lot_of_mistakes_when_allowed
#define int long long
int n; cin >> n;
int sum; cin >> sum;
if(n*2>sum){
cout <<"NO" <<endl;
}
else{
cout <<"YES" <<endl;
for(int i=1; i<n; ++i){
cout <<1 <<" ";
}
cout <<sum-n+1 <<endl;
cout <<n <<endl;
}
return 0;
}
Anagrams | Prime Number |
Lexical Sorting Reloaded | 1514A - Perfectly Imperfect Array |
580A- Kefa and First Steps | 1472B- Fair Division |
996A - Hit the Lottery | MSNSADM1 Football |
MATCHES Playing with Matches | HRDSEQ Hard Sequence |
DRCHEF Doctor Chef | 559. Maximum Depth of N-ary Tree |
821. Shortest Distance to a Character | 1441. Build an Array With Stack Operations |
1356. Sort Integers by The Number of 1 Bits | 922. Sort Array By Parity II |
344. Reverse String | 1047. Remove All Adjacent Duplicates In String |
977. Squares of a Sorted Array | 852. Peak Index in a Mountain Array |
461. Hamming Distance | 1748. Sum of Unique Elements |
897. Increasing Order Search Tree | 905. Sort Array By Parity |
1351. Count Negative Numbers in a Sorted Matrix | 617. Merge Two Binary Trees |
1450. Number of Students Doing Homework at a Given Time | 700. Search in a Binary Search Tree |
590. N-ary Tree Postorder Traversal | 589. N-ary Tree Preorder Traversal |